"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkCollection = void 0;
const utils_1 = require("../utils");
const collectionList = ["users", "shops", "goods", "goodType"];
const checkCollection = async (data, ctx) => {
    if (data.collectoin) {
        // if (!collectionList.includes(data.collection)) {
        //   await DbUtils.createCollection(data.collection);
        // }
        return data.collectoin;
    }
    else {
        ctx.body = utils_1.dealDbMessage(null, 404, "没有找到对应的表");
        return "";
    }
};
exports.checkCollection = checkCollection;
